@import "colors";
$blog-header-height: fit-content;

h1 {
  line-height: 81px;
  font-size: 68px;
  letter-spacing: -1px;
}

h2 {
  line-height: 48px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
}
h3 {
  line-height: 32px;
  font-size: 24px;
  letter-spacing: -1px;
}



p {
}

.blog-wrapper {
  background-color: $white;
  h1,
  h2 {
    color: $navy-darker;
  }
  h3 {
    width: unset;
    color: $black;
    padding-bottom: 5px;
    &::after {
      display: none;
    }
  }
  p {
    color: $gray-dark;
    font-size: 18px;
    line-height: 21px;
    font-weight: 300;
    padding: 15px 0 15px 0;
  }
}

.bg-dark {
  background-color: $navy-darker;
  h1,
  h2,
  h3,
  p {
    color: $white;
  }
  height: $blog-header-height;
  background-color: $navy-darker;
  grid-column: 1 / 5;
  grid-row: 1 / 2;
  h1 {
    z-index: 2;
    width: 100%;
  }
  h2 {
    font-family: "Montserrat", sans-serif;
    font-size: 24px;
    letter-spacing: -1px;
    line-height: 24px;
    padding-top: 75px;
  }
}

.blog-grid-main {
  margin-top: -1px;
  overflow: hidden;
  padding-bottom: 75px;
  display: grid;
  grid-template-columns: auto 50% 25% auto;
  grid-template-rows: 1fr auto;
  grid-column-gap: 30px;
}

.bg-photo,
.bg-dark,
.bg-light,
.bg-lighter {
  height: fit-content;
  display: grid;
  grid-template-columns: auto 76% auto;
  grid-column-gap: 0;
}

.bg-photo h1,
.bg-dark h1,
.bg-light h1,
.bg-lighter h1 {
  grid-column: 2 / 3;
}

.bg-photo h2,
.bg-dark h2,
.bg-light h2,
.bg-lighter h2 {
  grid-column: 2 / 3;
  padding-top: 50px;
  padding-bottom: 30px;
}

.bg-photo {
  padding-top: 5%;
  background-image: url("/imgs/rover.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 10% 50%;
  grid-column: 1 / 5;
  grid-row: 1 / 2;
  h1 {
    color: $white;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.65);
    z-index: 2;
  }
  h2 {
    color: $white;
    font-family: "Montserrat", sans-serif;
    font-size: 24px;
    letter-spacing: -1px;
    line-height: 24px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.65);
  }
}
.bg-light,
.bg-lighter {
  height: $blog-header-height;
  padding-top: 5%;
  grid-column: 1 / 5;
  grid-row: 1 / 2;
}
.bg-light {
    background-color: $white; //$gray-lighter;
}
.bg-lighter {
  background-color: $white;
}
.bg-light,
.bg-lighter {
  h1,
  h2 {
    color: $navy-darker;
  }
  h3 {
    color: $black;
  }
}

.blog-post-main {
  grid-column: 2 / 3;
  grid-row: 2 / 5;
  background-color: $white;
  padding-top: 5%;
}

.blog-post-main h1 a,
.blog-post-main h2 a {
  color: $black;
  text-decoration: none;
  &:hover {
    text-decoration: underline;
  }
}

.blog-post-main .image-large img {
  max-width: 100%;
}

.blog-post-main--archive {
  padding-bottom: 35px;
}

.blog-post-main--archive__link {
  font-weight: 700;
  font-size: 24px;
}

.blog-image-row {
  display: flex;
  justify-content: space-between;
}
.blog-image-row .image-small {
  max-width: 30%;
}

.blog-sidebar {
  padding: 0 15px 70px 15px;
  grid-column: 3 / 4;
  grid-row: 2 / 3;
  background-color: $white;//$gray-lighter;
  h1 {
    height: 50px;
    max-width: 330px;
    margin-top: 35px;
    font-weight: 700;
    font-size: 30px;
    letter-spacing: -1px;
    font-weight: 900;
  }
  h1 + * {
    padding-top: 0;
  }
  h2 {
    color: $black;
    font-size: 14px;
    line-height: 19px;
    &:hover {
      text-decoration: underline;
    }
  }
  h3 {
    font-size: 12px;
    line-height: 16px;
    color: $gray-light;
    padding-top: 0;
    font-style: italic;
  }
}

.blog-sidebar .recent-post {
  max-width: 90%;
  margin-left: 15px;
  margin-top: 25px;
  h1 a,
  h2 a,
  h3 a {
    color: $black;
    text-decoration: none;
    &:hover {
      text-decoration: underline;
    }
  }
}

.blog-sidebar--archive {
  padding: 25px 0 0 15px;
}

.blog-sidebar--archive__link {
  font-size: 16px;
  font-weight: 700;
}

.newsletter-signup {
  // This could be hooked up to an external tool for to allow for newsletter subscribers
  // Since it's not hooked up at present, it's been turned off.
  display: none;

  margin-top: 25px;
  margin-bottom: 25px;
  h2 {
    width: 300px;
  }
  input {
    width: 98%;
    padding: 8px 0 8px 0;
    margin-top: 10px;
    &::placeholder {
      color: $gray-light;
      font-style: italic;
      font-size: 12px;
      text-align: center;
    }
  }
}

.blog-sidebar .btn-subscribe {
  margin-top: 10px;
  width: 100%;
}

.blog-archive-wrapper {
  width: 100%;
  min-height: 65vh;
  background: $white;
}

.blog-archive-body__header {
  width: 100%;
  margin: 0 auto;
  margin-top: -1px;
  background-color: $navy-darker;
  height: $blog-header-height;
  h1 {
    padding-left: 10%;
    color: $white;
  }
}

.blog-archive-body {
  width: 80%;
  margin: 0 auto;
  padding-bottom: 30px;
}

.blog-archive-year {
  @extend h1;
  font-size: 44px;
  padding-top: 50px;
}

.blog-archive-post {
  padding-top: 10px;
  padding-bottom: 10px;
}

.blog-archive-post__title {
  font-size: 24px;
  color: $navy-darker;
  text-decoration: none;
  line-height: 26px;
  &:hover {
    text-decoration: underline;
  }
}

.blog-archive-post__date-author {
  font-size: 18px;
  color: $gray-dark;
  padding-top: 0;
}

@media screen and (max-width: 767px) {
  .blog-wrapper {
    padding-top: 0;
  }

  .bg-lighter,
  .bg-light,
  .bg-dark,
  .bg-photo {
    background-position: 20% 50%;
    grid-template-columns: auto 95% auto;
    h1 {
      font-size: 55px;
      line-height: 1;
    }
    h2 {
      font-size: 22px;
      line-height: 24px;
      padding-top: 15px;
    }
  }

  .blog-grid-main {
    padding-bottom: 0;
  }

  .blog-post-main {
    display: block;
    width: 85vw;
    margin: 0 auto;
  }

  .blog-post-main .image-large {
    padding: 0;
    padding-top: 1em;
    margin-left: -8vw;
    width: 100vw;
  }

  .blog-sidebar {
    grid-column: 1 / 5;
    grid-row: 5 / 6;
  }

  .blog-sidebar--archive {
    padding-left: 0;
  }

  .recent-post {
    padding-top: 0;
    padding-left: 10px;
  }

  .blog-sidebar {
    .newsletter-signup {
      width: 90%;
      margin: 0 auto;
      padding-bottom: 50px;
      input {
        width: 90%;
      }
      .btn-subscribe {
        width: 91%;
      }
    }
  }
}

@media screen and (max-width: 993px) and (min-width: 450px) {
  .blog-wrapper {
    padding-top: 0;
  }

  .bg-light,
  .bg-lighter {
    padding-bottom: 15px;
    height: auto;
  }
  .blog-grid-main {
    padding: 0;
    grid-template-columns: auto 50% 33% auto;
  }
}

@media screen and (max-width: 449px) {
  .blog-grid-main {
    padding: 0;
  }
  .bg-photo {
  }
}

@media screen and (max-width: 380px) {
  .bg-photo,
  .bg-dark,
  .bg-light,
  .bg-lighter {
    h1 {
      font-size: 50px;
      line-height: 1;
    }
  }

  .blog-post-main {
    grid-column: 1 / 4;
    width: 90vw;
    padding-left: 15px;
  }
}
